package com.sts;

import cn.hutool.core.lang.Singleton;
import com.formdev.flatlaf.FlatIntelliJLaf;
import com.sts.common.utils.ConfigFileUtil;
import com.sts.frame.RootFrame;

import javax.swing.*;
import java.awt.*;

public class Main {

    public static RootFrame rootFrame = null;

    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -> {
            Font defaultFont = Singleton.get(ConfigFileUtil.class).getDefaultFont();
            FlatIntelliJLaf.setup();
            int arc = 20;
            UIManager.put("defaultFont", defaultFont);
            UIManager.put("Button.arc", arc);
            UIManager.put("Component.arc", arc);
            UIManager.put("Component.focusWidth", 0);
            UIManager.put("TabbedPane.tabArc", arc);
            UIManager.put("TabbedPane.tabSelectionArc", arc);
            UIManager.put("TextComponent.arc", arc);
            UIManager.put("List.selectionArc", arc);
            UIManager.put("MenuBar.selectionArc", arc);
            UIManager.put("MenuItem.selectionArc", arc);
            UIManager.put("ComboBox.selectionArc", arc);
            UIManager.put("ScrollBar.trackArc", arc);
            UIManager.put("ScrollBar.thumbArc", arc);
            UIManager.put("OptionPane.showIcon", true);
            rootFrame = new RootFrame();
        });
    }
}